#ifndef STATECONNECTION_H_
#define STATECONNECTION_H_

#include "scHeader.h"
#include "StateEngine.h"

namespace sybilpm
{

/**
 * The state engine specific to the SrvConnection class.
 */
class StateConnection: public StateEngine
{
	Q_OBJECT
public:
	StateConnection();
	virtual ~StateConnection();
	inline int SETUP() const {return stSetup;}
	inline int TEST() const {return stTest;}
	inline int IDLE() const {return stIdle;}
	inline int ACTIVE() const {return stActive;}
	inline int FAILED() const {return stFailed;}
	inline bool isSetup() const {return state==stSetup;}
	inline bool isTest() const {return state==stTest;}
	inline bool isIdle() const {return state==stIdle;}
	inline bool isActive() const {return state==stActive;}
	inline bool isFailed() const {return state==stFailed;}

private:
	int stSetup, stTest, stIdle, stActive, stFailed;
};

} // namespace sybilpm

#endif /* STATECONNECTION_H_ */
